<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">  

    <ui:composition template="/templates/templateCadastro.xhtml">

        <ui:define name="content">

            <h:panelGroup id="cadastro">


                    <p:panel header="Cadastro de Estagiário">

                        <h:panelGrid columns="2" cellspacing="10">

                            <h:outputLabel value="Nome:" style="font-weight: bold"/>
                            <p:inputText label="Nome" required="true" requiredMessage="campo obrigatório." 
                                         title="Nome do(a) Estagiário(a)" size="50"/>

                            <p:commandButton value="Cadastrar" />
                            <p:commandButton value="Cancelar" immediate="true" />

                        </h:panelGrid>

                    </p:panel>


            </h:panelGroup>

            <h:panelGroup id="listagem">


                    <p:commandLink action="#{menuBean.cadastrar()}" value="NOVO" ajax="true" update="cadastro, listagem" />


            </h:panelGroup>


        </ui:define>

    </ui:composition>

</html>